Make sure the menu pops up as wide as the combobox. (#59660, Havoc
authorMatthias Clasen <mclasen@redhat.com>
Mon, 10 May 2004 15:44:48 +0000 (15:44 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 10 May 2004 15:44:48 +0000 (15:44 +0000)
2004-05-10  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkcombobox.c (gtk_combo_box_popup)
(gtk_combo_box_menu_button_press): Make sure the menu pops up
as wide as the combobox.  (#59660, Havoc Pennington)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 670627e4c401f80ff34763c60f7e48627ee89c48..d6f6aa9844fc22d1f67090cba1bcf3c8b52eec1e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-05-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup) 
+       (gtk_combo_box_menu_button_press): Make sure the menu pops up
+       as wide as the combobox.  (#59660, Havoc Pennington)
+
 2004-05-10  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcombobox.h: 
index 670627e4c401f80ff34763c60f7e48627ee89c48..d6f6aa9844fc22d1f67090cba1bcf3c8b52eec1e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup) 
+       (gtk_combo_box_menu_button_press): Make sure the menu pops up
+       as wide as the combobox.  (#59660, Havoc Pennington)
+
 2004-05-10  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcombobox.h: 
index 670627e4c401f80ff34763c60f7e48627ee89c48..d6f6aa9844fc22d1f67090cba1bcf3c8b52eec1e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup) 
+       (gtk_combo_box_menu_button_press): Make sure the menu pops up
+       as wide as the combobox.  (#59660, Havoc Pennington)
+
 2004-05-10  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcombobox.h: 
index 670627e4c401f80ff34763c60f7e48627ee89c48..d6f6aa9844fc22d1f67090cba1bcf3c8b52eec1e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-10  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup) 
+       (gtk_combo_box_menu_button_press): Make sure the menu pops up
+       as wide as the combobox.  (#59660, Havoc Pennington)
+
 2004-05-10  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkcombobox.h: 
index 18cd9ddd810a7a68435deb95fbd3731de6eb2264..069fbefb1e5873a7f009bb4c255d57381dede373 100644 (file)
@@ -1150,6 +1150,12 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
       gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget),
                           combo_box->priv->active_item);
 
+      if (combo_box->priv->wrap_width == 0)
+       {
+         width = GTK_WIDGET (combo_box)->allocation.width;
+         gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1);
+       }
+      
       gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
                      NULL, NULL,
                      gtk_combo_box_menu_position, combo_box,
@@ -1921,6 +1927,7 @@ gtk_combo_box_menu_button_press (GtkWidget      *widget,
                                  gpointer        user_data)
 {
   GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
+  gint width;
 
   if (! GTK_IS_MENU (combo_box->priv->popup_widget))
     return FALSE;
@@ -1932,6 +1939,12 @@ gtk_combo_box_menu_button_press (GtkWidget      *widget,
       gtk_menu_set_active (GTK_MENU (combo_box->priv->popup_widget),
                           combo_box->priv->active_item);
 
+      if (combo_box->priv->wrap_width == 0)
+       {
+         width = GTK_WIDGET (combo_box)->allocation.width;
+         gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1);
+       }
+
       gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),
                       NULL, NULL,
                       gtk_combo_box_menu_position, combo_box,